package com.medranocg.gd

class Document {

    String name
    Customer customer
    Box box
    String tags
    String documentVersion
	Long realVersion
    Boolean lastVersion
    Date validTo
    DocumentType documentType
    String notes
    Date createdDate
    Date lastUpdated
    String createdByUserName
    Date deleteDate
    String deleteByUserName 
    
    String dayCreated

    static constraints = {
        tags nullable: true
        notes type: 'text', nullable: true
        deleteDate nullable: true
        deleteByUserName nullable: true
    }
	
	static mapping = {
		table 'gdca_document'
        dayCreated formula: "to_char(created_date, 'DD-MM-YYYY')"
	}
	
}
